<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <link rel="stylesheet" href="./layui/css/layui.css">
    <style>
        form {
            margin-top: 50%;
            margin-left: 50px;
            margin-right: 50px;
            transform: translateY(-50%);
        }
    </style>
</head>
<body>

<form class="layui-form" action="/usermsg" method="post">
    <input type="text" name="code" hidden value="1">
    <div class="layui-form-item">
        <label class="layui-form-label">姓名：</label>
        <div class="layui-input-block">
            <input type="text" name="name" required  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">年龄：</label>
        <div class="layui-input-block">
            <input type="number" name="age" required  lay-verify="required" placeholder="请输入年龄" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">健康码状态：</label>
        <div class="layui-input-block">
            <select name="ma" lay-verify="required">
                <option value=""></option>
                <option value="0">绿码</option>
                <option value="1">黄码</option>
                <option value="2">红码</option>

            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">是否接种疫苗：</label>
        <div class="layui-input-block">
            <input type="checkbox" name="switch" lay-skin="switch">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">单选框</label>
        <div class="layui-input-block">
            <input type="radio" name="sex" value="男" title="男" checked>
            <input type="radio" name="sex" value="女" title="女" >
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>

<script src="./layui/layui.js"></script>
<script>
    layui.use(['form'], function(){
        var form = layui.form;
    })


</script>
</body>
</html>